<!DOCTYPE html>
<html>
<body>

<h2>Using the XMLHttpRequest Object</h2>

<div id="demo">
    <button type="button" onclick="loadXMLDoc()">Change Content</button>
</div>

<script>
    function loadXMLDoc() {
        var url = "http://localhost:8080/employee";
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
                document.getElementById("demo").innerHTML =this.responseText;
            }
        };
        xhttp.open("DELETE", url);
       // xhttp.setRequestHeader("TestHeader1000","12345");
        xhttp.send();
    }
</script>

</body>
</html>
